Skip to content

Conversation

mao-sz
Copy link
Contributor

@mao-sz mao-sz commented Aug 16, 2024

Because

This lesson is great but does have a lot of language that speaks in absolutes, especially with some examples labelled as "bad" but are actually quite commonly used in some conventions. This sparked some confusion due to contradictory information across lessons and examples.

It would be better to use fewer absolutes and focus more on the ideas behind cleaner code, establishing that there are many conventions that aim to implement those ideas via slightly different specific approaches.

This PR

  • Reframes overall lesson language to focus less on absolutes with good/bad and more on preferable/not preferable, and the ideas behind why.
  • Adds note box highlighting how specific conventions differ between organisations, despite the same overall purpose
  • Amends some examples to demonstrate a slightly more practical scenario (current example does not really represent a practical situation without going into mutating objects, and they would not yet have been introduced in the curriculum)
  • Fixes KC/AR link text labels (question format and accessibility)

Issue

Closes #28643

Additional Information

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

@github-actions github-actions bot added the Content: Foundations Involves the Foundations content label Aug 16, 2024
@mao-sz mao-sz force-pushed the feature/clean-code-reframe branch from 179f44a to 17cc204 Compare August 17, 2024 12:23
Copy link
Member

@KevinMulhern KevinMulhern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me @MaoShizhong, really nice improvement 💪

@mao-sz mao-sz merged commit 099eb78 into TheOdinProject:main Aug 18, 2024
2 checks passed
@mao-sz mao-sz deleted the feature/clean-code-reframe branch August 18, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content: Foundations Involves the Foundations content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean Code: About naming conventions
2 participants